#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i,x,y;
	double a[100];
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>x>>y;
		a[i]=1.0*y/x;
	}
	for(i=2;i<=n;i++)
	{
		if(a[i]-a[1]>0.05)
		{
			cout<<"better"<<endl;
			continue;
		}
		if(a[1]-a[i]>0.05)
		{
			cout<<"worse"<<endl;
			continue;
		}
		cout<<"same"<<endl;
	}
    return 0;
}

